import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wwy
 * Date: 2024-05-18
 * Time: 15:14
 */
public class Test018 {
    public static void main(String[] args) {
        int[] a={1,2,3,45,6,6};
        for (int i = 0; i < a.length-1; i++) {
            for (int i1 = 0; i1 < a.length - 1 - i; i1++) {
                if(a[i1]>a[i1+1]){
                    int t=a[i1];
                    a[i1]=a[i1+1];
                    a[i1+1]=t;
                }
            }
        }
        System.out.println(Arrays.toString(a));
    }
}
